<%@page import="java.util.Date"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="statics/js/goods_dateTime.js" charset="UTF-8"></script>
<script type="text/javascript" src="statics/js/My97DatePicker/WdatePicker.js" charset="UTF-8"></script>
<link rel="stylesheet" type="text/css" href="statics/css/goods_dateTime.css" />
</head>
<body>
	<div class="address">
		<div class="take">
			<c:choose>
				<c:when test="${param.type==2 }"><h4>接送地点</h4></c:when>
				<c:otherwise><h4>取车门店</h4></c:otherwise>
			</c:choose>
			<div class="c1">
					<select name="qulocation" class="location">
						<c:forEach items="${place }" var="p">
							<option value="${p.pname }" <c:if test="${p.pid==param.qulocation }">selected="selected"</c:if>  data-id="${p.pid }">${p.pname }</option>
						</c:forEach>
					</select>
					<select name="qustore" class="store">
						<c:forEach items="${qulist }" var="ps">
							<option value="${ps.psName }" <c:if test="${ps.psId==param.qustore }">selected="selected"</c:if>  data-id="${ps.psId }">${ps.psName }</option>
						</c:forEach>
					</select>
			</div>
			<c:choose>
				<c:when test="${param.type==2 }"><h4>接送时间</h4></c:when>
				<c:otherwise><h4>取车门店</h4></c:otherwise>
			</c:choose>
			<div class="c1">
				<div class="date">
					<input id="qutime" type="text" value="${param.quday }" name="takeTime" readonly="readonly" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'huantime\')||\'2020-10-01\'}',minDate:'%y-%M-%d'})">
				</div>
				<div class="time">
					<select id="time" name="takeTime" data-time="${param.qutime }" data-haha="${time }">
						<c:set value="09" var="hour" />
						<c:set value="00" var="minute"/>
						<c:forEach begin="${hour }" end="22" var="i">
							<c:forEach begin="${minute }" end="59" var="j" step="30">
								<option value="<fmt:formatNumber type="number" minIntegerDigits="2" value="${i }"/>:<fmt:formatNumber type="number" minIntegerDigits="2" value="${j}"/>">
									<fmt:formatNumber type="number" minIntegerDigits="2" value="${i }"/>:<fmt:formatNumber type="number" minIntegerDigits="2" value="${j}"/>
								</option>
							</c:forEach>
						</c:forEach>
					</select>
				</div>
			</div>
		</div>
		<c:if test="${param.type!=2 }"><hr></c:if>
		<div class="return" <c:if test="${param.type==2 }"> style="display:none;"</c:if>>
			<h4>还车门店</h4>
			<div class="c1">
				<select name="huanlocation" class="location" >
					<c:forEach items="${place }" var="p">
						<option value="${p.pname }" <c:if test="${p.pid==param.huanlocation }">selected="selected"</c:if> data-id="${p.pid }">${p.pname }</option>
					</c:forEach>
				</select>
				<select name="huanstore" class="store">
					<c:forEach items="${huanlist }" var="ps">
						<option value="${ps.psName }" <c:if test="${ps.psId==param.huanstore }">selected="selected"</c:if> data-id="${ps.psId }">${ps.psName }</option>
					</c:forEach>
				</select>
			</div>
			<h4>还车时间</h4>
			<div class="c1" >
				<div class="date">
					<input id="huantime" type="text" value="${param.huanday }" name="returnTime" readonly="readonly" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'qutime\')}',maxDate:'2020-10-01'})">
				</div>
				<div class="time">
					<select id="time" name="returnTime" data-time="${param.huantime }">
						<c:set value="09" var="hour" />
						<c:set value="00" var="minute"/>
						<c:forEach begin="${hour }" end="22" var="i">
							<c:forEach begin="${minute }" end="59" var="j" step="30">
								<option value="<fmt:formatNumber type="number" minIntegerDigits="2" value="${i }"/>:<fmt:formatNumber type="number" minIntegerDigits="2" value="${j}"/>">
									<fmt:formatNumber type="number" minIntegerDigits="2" value="${i }"/>:<fmt:formatNumber type="number" minIntegerDigits="2" value="${j}"/>
								</option>
							</c:forEach>
						</c:forEach>
					</select>
				</div>
			</div>
		</div>
		<hr>
		<button>确认修改</button>
	</div>
</body>
</html>